from app.tools.common import comm


# 频繁访问
def frequently_accessed(ip, ua):
    # 检测ua是否是常规设备
    if ua == 'unknown':
        comm("用户访问过于频繁，疑似恶意爬虫", ip, ua, "高危")
    else:
        comm("用户使用可识别终端访问过于频繁", ip, ua, "低危")


# sql注入与xss
def web_attack(details, ip, ua, lv, path):
    comm(details, ip, ua, lv, path)
